package com.gxa.community.agent.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.gxa.community.agent.service.OrderService;
import com.gxa.community.agent.utils.RangeUtils;
import com.gxa.community.core.pojo.vo.order.WayBillVo;
import com.gxa.community.core.utils.R;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    public R requestPostAdmin(String url,Object o){
        String adminUrl = "http://localhost:8080/";
        return JSONObject.parseObject(RangeUtils.post(adminUrl + url, o,null,null),R.class);
    }
    /**
     * 查询运单信息
     * @param page
     * @param size
     * @param wayBillVo
     * @return
     */
    @Override
    public R queryWaybill(Integer page, Integer size, WayBillVo wayBillVo) {
        return requestPostAdmin("order/queryWaybill",wayBillVo);
    }

    /*
        运单
        待配送
        送货中
        已收货(团长)

        订单
        待提货
        待配送
        送货中
        已提货(用户)
     */
}
